<template>
	<view class="order">
		<u-navbar title="支付页面2" @click="rightClick" :autoBack="true">
		</u-navbar>
		<view class="addresscard" @click="goaddresschange">
			<view class="leftinfo">
				<view class="leftinfo-top">
					<view class="username">
						用户名
					</view>
					<view class="">
						19953265879
					</view>
				</view>
				<view class="leftinfo-center">
					hdifhvliuihfviudsuvhsii哦收到怒视大VUI的白色礼服i吧不大舒服v不商业化v比速比v
				</view>
			</view>
			<view class="rightinfo">
				<u-icon name="arrow-right" size="20"></u-icon>
			</view>
		</view>
		<view class="listcard">
			<view class="listcardbox">
				<view class="listtitle">
					订单详细
				</view>
				<view class="list" v-for="(item,index) in orderlist" :key="index">
					<view class="listitem">
						<view class="listitemimgbox">
							<image class="listitemimg" :src="item.url" mode=""></image>
						</view>
						<view class="infoitem">
							<view class="infoname">
								{{item.name}}
							</view>

							<view class="infonum">
								{{item.num}}
							</view>
							<view class="infoprice">
								￥{{item.price}}
							</view>
						</view>
					</view>
				</view>
				<view class="actualamount">
					<view class="actualamountnum">
						小计：25.54
					</view>
					<view class="actualamountprice">
						共5件商品
					</view>
				</view>
			</view>
			<view class="otherbox">
				<view class="beizhu">
					<view class="textbeizhu">
						备注:
					</view>
					<u--input placeholder="请输入内容" border="bottom" v-model="value1" @change="change"
						clearable></u--input>
				</view>
				<view class="ppayfunclass">
					<view class="textbeizhu">
						支付方式
					</view>
					<view class="textbeizhu">
						微信支付
					</view>
				</view>
			</view>
		</view>

		<view class="cardhard">
			<view class="cardhardicon">
				<u-icon name="shopping-cart" size="56"></u-icon>
			</view>
			<view class="pricesave">
				<view class="">
					￥ {{numprice}}
				</view>
				<view class="saveadd" @click="goorderpay">
					下单
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				numprice: 0,
				autoBack: false,
				orderlist: [{
						name: 'mianfu',
						url: require('@/static/images/01.png'),
						price: 20,
						num: 3,
					},
					{
						name: 'mianfu',
						url: require('@/static/images/01.png'),
						price: 20,
						num: 3,
					},
					{
						name: 'mianfu',
						url: require('@/static/images/01.png'),
						price: 20,
						num: 3,
					},
					{
						name: 'mianfu',
						url: require('@/static/images/01.png'),
						price: 20,
						num: 3,
					},
					{
						name: 'mianfu',
						url: require('@/static/images/01.png'),
						price: 20,
						num: 3,
					},
					{
						name: 'mianfu',
						url: require('@/static/images/01.png'),
						price: 20,
						num: 3,
					},
				]
			}
		},
		methods: {
			goaddresschange() {
				wx.navigateTo({
					url: '/pages/addresschange/addresschange'
				})
			},
			rightClick() {
				wx.reLaunch({
					url: '/pages/index/index'
				})
			},
			goorderpay() {

			}
		},
		onShow(option) {
			console.log(option)
		}
	}
</script>

<style lang="less" scoped>
	.order {
		width: 100%;
		height: 100vh;
		position: relative;
	}

	.addresscard {
		width: 90%;
		height: 88px;
		background: #fff;
		box-shadow: 0px 0px 4px 0px #ccc;
		position: relative;
		top: 12%;
		margin: 0 auto;
		border-radius: 10px;
		display: flex;
		justify-content: space-between;
		padding: 10px;
		box-sizing: border-box;
		overflow: hidden;
	}

	.leftinfo {
		width: 90%;
		height: 100%;
		//background: #55aaff;

	}

	.username {
		margin-right: 10px;
	}

	.leftinfo-top {
		width: 100%;
		display: flex;
		margin-bottom: 10px;

	}

	.leftinfo-center {
		width: 100%;
		font-size: 14px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: normal;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;

	}

	.rightinfo {
		width: 10%;
		height: 100%;
		//background: #ffaaff;
		display: flex;
		justify-content: center;
		align-items: center;

	}

	.listcardbox {
		width: 90%;
		margin: 5px auto;
		background-color: #fff;
		box-shadow: 1px 1px 4px 0 #ccc;
		border-radius: 10px;
	}

	.listtitle {
		width: 100%;
		line-height: 30px;
		font-size: 16px;
		padding: 5px 20px;
	}

	.listcard {
		width: 100%;
		height: calc(100vh - 25% - 88px);
		background: #fff;
		position: relative;
		top: 12%;
		display: flex;
		flex-direction: column;
		align-items: center;
		box-sizing: border-box;
		overflow-y: scroll;
		overflow-x: hidden;
	}

	.otherbox {
		width: 90%;
		margin: 10px auto;
		box-shadow: 1px 1px 4px 0 #ccc;
		border-radius: 20px;
		box-sizing: border-box;
	}

	.beizhu {
		width: 100%;
		height: 70px;
		background: #fff;

		border-bottom: 1px solid #ccc;
		display: flex;
		align-items: center;
		//	margin: 10px auto;
		font-size: 16px;
		box-sizing: border-box;
		padding: 5px 10px;
	}

	.ppayfunclass {
		width: 100%;
		height: 70px;
		background: #fff;

		font-size: 16px;
		display: flex;
		align-items: center;
		//	margin: 10px auto;

		box-sizing: border-box;
		padding: 5px 10px;
		display: flex;
		justify-content: space-between;
	}

	.textbeizhu {
		margin-right: 10px;
	}

	.list {
		width: 90%;
		height: 90px;
		margin: 5px auto;
		background: #fff;
		//border-radius: 10px;
		border-bottom: 1px solid #ccc;

	}

	.list:last-child {
		border: none;
	}

	.actualamount {
		width: 100%;
		display: flex;
		flex-direction: row-reverse;
		padding: 5px 10px 10px 10px;
		font-size: 16px;
		box-sizing: border-box;
		//border-top: 1px solid #ccc;
	}

	.actualamountnum {
		margin-left: 10px;
	}

	.listitem {
		height: 100%;
		display: flex;
	}

	.listitemimgbox {
		height: 100%;
		display: flex;
		align-items: center;
	}

	.infoitem {
		width: calc(100% - 90px);
		display: flex;
		flex-direction: column;
		padding: 10px;
		box-sizing: border-box;
	}

	.infoname {
		width: 100%;
		text-align: left;
		font-size: 20px;
	}

	.infonum {
		width: 100%;
		text-align: left;
		font-size: 16px;
	}

	.infoprice {
		width: 100%;
		text-align: right;
		font-size: 16px;
	}

	.cardhard {
		width: 100%;
		height: 12%;
		background: #fff;
		position: fixed;
		bottom: 0;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 0 20px;
		box-sizing: border-box;
		border-radius: 10px 10px 0 0;
		box-shadow: 1px -1px 1px 0 #ccc;

	}



	.listitemimg {
		width: 80px;
		height: 80px;
		border-radius: 10px;
		margin-right: 10px;
	}

	.pricesave {
		display: flex;
		align-items: center;
	}

	.saveadd {
		margin-left: 20px;
		width: 80px;
		height: 45px;
		background: #ffa604;
		text-align: center;
		line-height: 45px;
		color: #fff;
		border-radius: 10px;
		box-shadow: 1px 1px 3px 0 #d08d05;
	}
</style>